<!--
Copyright 2017 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<kd-resource-card-list selectable="false"
                       with-statuses="false">

  <kd-resource-card-list-header>
    <kd-resource-card-list-title ng-transclude="header">
      [[Resource Limits|Resource limit info details section title.]]
    </kd-resource-card-list-title>
  </kd-resource-card-list-header>

  <kd-resource-card-header-columns>
    <kd-resource-card-header-column size="small"
                                    grow="2">
      [[Type|Resource Limits name entry.]]
    </kd-resource-card-header-column>
    <kd-resource-card-header-column size="small"
                                    grow="1">
      [[Resource|Resource Limits resource entry.]]
    </kd-resource-card-header-column>
    <kd-resource-card-header-column size="small"
                                    grow="1">
      [[Min|Resource Limits min entry.]]
    </kd-resource-card-header-column>
    <kd-resource-card-header-column size="small"
                                    grow="1">
      [[Max|Resource Limits max entry.]]
    </kd-resource-card-header-column>
    <kd-resource-card-header-column size="small"
                                    grow="1">
      [[Default Request|Resource Limits default request entry.]]
    </kd-resource-card-header-column>
    <kd-resource-card-header-column size="small"
                                    grow="1">
      [[Default Limit|Resource Limits default limit entry.]]
    </kd-resource-card-header-column>
    <kd-resource-card-header-column size="small"
                                    grow="1">
      [[Max Limit/Request Ratio|Resource Limits max limit/request ratio entry.]]
    </kd-resource-card-header-column>
  </kd-resource-card-header-columns>
  <kd-resource-card ng-repeat="(key, limitRange) in ::$ctrl.resourceLimits"
                    omit-meta="true">
    <kd-resource-card-columns>
      <kd-resource-card-column>
        <div>{{::limitRange.resourceType}}</div>
        <div ng-if="::!limitRange.resourceType.length">-</div>
      </kd-resource-card-column>
      <kd-resource-card-column>
        <div>{{::limitRange.resourceName}}</div>
        <div ng-if="::!limitRange.resourceName.length">-</div>
      </kd-resource-card-column>
      <kd-resource-card-column>
        <div>{{::limitRange.min}}</div>
        <div ng-if="::!limitRange.min.length">-</div>
      </kd-resource-card-column>
      <kd-resource-card-column>
        <div>{{::limitRange.max}}</div>
        <div ng-if="::!limitRange.max.length">-</div>
      </kd-resource-card-column>
      <kd-resource-card-column>
        <div>{{::limitRange.defaultRequest}}</div>
        <div ng-if="::!limitRange.defaultRequest.length">-</div>
      </kd-resource-card-column>
      <kd-resource-card-column>
        <div>{{::limitRange.default}}</div>
        <div ng-if="::!limitRange.default.length">-</div>
      </kd-resource-card-column>
      <kd-resource-card-column>
        <div>{{::limitRange.maxLimitRequestRatio}}</div>
        <div ng-if="::!limitRange.maxLimitRequestRatio.length">-</div>
      </kd-resource-card-column>
    </kd-resource-card-columns>
  </kd-resource-card>
</kd-resource-card-list>
